/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UserBeans;

import Action.EventSessionBeanLocal;
import Entity.Event;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Cyrax
 */
@ManagedBean
@RequestScoped
public class SearchUserBean {
    @EJB
    private EventSessionBeanLocal eventSessionBean;
    private String key;
    /** Creates a new instance of SearchUserBean */
    public SearchUserBean() {


    }

     //Search
    public List<Event> getsearchListEvent() {
        List<Event> ev = null;
        ev = eventSessionBean.searchEvent(getKey().toString());
        return ev;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

}
